#!/bin/bash

source /opt/ros/noetic/setup.bash

# 设置输出目录
OUTPUT_DIR="rosrecord"

# 删除以前的构建
rm -rf build ${OUTPUT_DIR}

# 创建并进入构建目录
mkdir -p build
cd build

# 运行 CMake 配置
cmake .. -DCMAKE_INSTALL_PREFIX=../${OUTPUT_DIR}

# 编译项目
make

# 安装到输出目录
make install

echo "Build and installation complete. Files are located in the '${OUTPUT_DIR}' directory."

